<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en">
<head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <title>Diary </title>

    <link rel="stylesheet" href="Libraries/css/menu_style.css" type="text/css" media="screen" />
 

    
</head>
<body>

       
                
                <div class="art-nav" align="right">
                    
                      <ul class="art-menu">
                        <li></li>
                        <?PHP 
                            //$db->setQuery("select * from NhomChucNang a, ThucHien b where maquyen=".$_SESSION['maquyen']." and a.macn = b.macn  ");
                            //$db->setQuery("select * from QuyenChucNang where parent=0 and maquyen='".$_SESSION['maquyen']."' order by macn asc ");
                            //$mainmenu = $db->fetchAll();
                            
                            while ($rows = mysql_fetch_array($nd->dsChucNang())){
                                if ($rows['parent']==0){
                                
                                echo "<li>";
                            
                                echo "<a href=\"".$rows['link']."\"><span class=\"l\"></span><span class=\"r\"></span><span class=\"t\">".$rows['tencn']."</span></a>";
                                    echo "<ul>";
                                        //$sql = "select * from QuyenChucNang where  maquyen='".$_SESSION['maquyen']."' and parent=".$macn." order by macn asc";
                                        //$db->setQuery($sql);
                                        //$submenu = $db->fetchAll();
                                        $macn = $rows['macn'];
                                        while($rows = mysql_fetch_array($nd->dsChucNang())){
                                            if ($rows['parent']==$macn){
                                            echo "<li><a href=\"".$rows['link']."\">".$rows['tencn']."</a></li>";
                                                
                                                echo "<ul>";
                                                    //$sql = "select * from QuyenChucNang where  maquyen='".$_SESSION['maquyen']."' and parent=".$macn." order by macn asc";
                                                    //$db->setQuery($sql);
                                                    //$subsubmenu = $db->fetchAll();
                                                    $macn = $rows['macn'];
                                                    while($rows = mysql_fetch_array($nd->dsChucNang())){
                                                        if ($rows['parent']==$macn){
                                                        echo "<li><a href=\"".$rows['link']."\">".$rows['tencn']."</a></li>";
                                                        }
                                                    }
                                                echo "</ul>";
                                                }
                                       }
                                    echo "</ul>";
                                echo "</li>";
                                }
                            }
                            
                        ?>
                        
                    </ul>
                   
                  
                  
                </div>
               
</body>
</html>
